package cn.lzy.autowire;

import cn.lzy.autowire.entity.User;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @Description
 * @Author Administrator
 * @Date 2023/11/23 1:42
 * @Version
 **/
public class TestDemo2ConfigLoad {

    public static void main(String[] args) {
        // FileSystemXmlApplicationContext会从项目的根目录进行读取
        FileSystemXmlApplicationContext ftx = new FileSystemXmlApplicationContext("simple_property_autowire/src/main/resources/beans.xml");
        User user = ftx.getBean("user2", User.class);
        System.out.println(user);
    }
}
